(:
  A procedure to number all items in a Display file
  It suppresses any previous numbering
:)
declare boundary-space strip;
import module namespace
    jj = "http://kumquat.emse.fr/utilitaires"
    at "jjutils.xq" ;
<display>{
let $t := $arguments[1]
let $userfacet := $arguments[2]
let $tosplitfacet := $arguments[3]
let $d := doc($t)/display/item
for $e at $p in $d
return
  <item>{
   $e/info,
   <info>{
     attribute name {concat("act-",string($e/info[@name=$userfacet]))}, 
     $e/info[@name=$tosplitfacet]/*
   }</info>
  }</item>
}</display>
